<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>查看购物车</title>
    <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <!-- 引入jquery代码, -->
    <script type="text/javascript" src="js/jquery-1.11.3.js"></script>
    <script type="text/javascript" src="bootstrap/js/bootstrap.min.js"></script>

</head>
<body>
<jsp:include page="header.jsp"/>

<c:if test="${empty admin}">
    <jsp:forward page="login.jsp"></jsp:forward>
</c:if>

<div class="container-fluid">
    <div class="row">

                <div class="col-md-2">
                </div>
                <div class="col-md-8">
                    <table class="table">
                        <thead>
                        <tr>
                            <th>
                                序号
                            </th>
                            <th>
                                古画名
                            </th>
                            <th>
                                数量
                            </th>

                        </tr>
                        </thead>
                        <tbody>
                        <c:if test="${!empty cart}">
                            <c:forEach items="${cart}" var="touristAttraction" varStatus="vs">
                                <c:if test="${vs.count%2==0}">
                                    <tr class="table-active">
                                        <td>${vs.count}</td>
                                        <td>${touristAttraction.name}</td>
                                        <td>${touristAttraction.cartNum}</td>
                                    </tr>
                                </c:if>
                                <c:if test="${vs.count%2!=0}">
                                    <tr >
                                        <td>${vs.count}</td>
                                        <td>${touristAttraction.name}</td>
                                        <td>${touristAttraction.cartNum}</td>
                                    </tr>
                                </c:if>
                            </c:forEach>
                        </c:if>
                        </tbody>
                    </table>
                    <a href='userList.ancientPainting'>返回古画列表</a><br/>
                </div>
                <div class="col-md-2">
                </div>

    </div>
</div>


</body>
</html>
